package com.qixin.modules.dataauth.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qixin.modules.dataauth.entity.SysDataAuth;
import com.qixin.modules.dataauth.mapper.SysDataAuthMapper;
import com.qixin.modules.dataauth.service.ISysDataAuthService;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;
import java.util.Map;

/**
 * @Description: 数据权限配置表
 * @Author: qixin-boot
 * @Date:   2021-08-18
 * @Version: V1.0
 */
@Service
public class SysDataAuthServiceImpl extends ServiceImpl<SysDataAuthMapper, SysDataAuth> implements ISysDataAuthService {

    @Override
    public void setUserRelTenantIds(String dataAuthId, List<String> userIdList) {
        this.getBaseMapper().setUserRelTenantIds(dataAuthId,userIdList);
    }

    @Override
    public void removeUserRelTenantIds(List<String> userIdList) {
        this.getBaseMapper().removeUserRelTenantIds("11",userIdList);
    }

    @Override
    public IPage<Map<String, String>> queryUserList(Page<Map<String, String>> page, String dataAuthId, String userName) {
        return this.getBaseMapper().queryUserList(page, dataAuthId, userName);
    }

    @Override
    public Integer countSyuser(String id) {
        return this.getBaseMapper().countSyuser(id);
    }
}
